package com.hmall.user.configuration;



import com.hmall.user.filter.ProjectHandler;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@ComponentScan("com.hmall")
public class SpringMVCConfig implements WebMvcConfigurer {
    //拦截器拦截请求设置
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ProjectHandler()).addPathPatterns("/user/**");
    }

}
